<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv=“X-UA-Compatible” content=“chrome=1″ />
    <title>Title</title>
</head>
<script type="text/javascript" src="${resCtx}/js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="${resCtx}/js/sockjs.min.js"></script>
<script type="text/javascript">
    var ctx = '${ctx}';
    var resCtx = '${resCtx}';
    function broadcast(){
        $.ajax({
            url:ctx+'/front/broadcast',
            type:"post",
            data:{text:$("#msg").val()},
            dataType:"json",
            success:function(data){
                alert("发送成功");
            }
        });
    }
</script>
</head>
<body>
发送广播
<textarea style="width:100%;height:300px;" id="msg" ></textarea>
<input type="button" value="发送" onclick="broadcast()">
</body>

</html>